<template>
  <div class="category">
    <t-header></t-header>
    <div class="main_con">
      <scroll-menu></scroll-menu>
    </div>
  </div>
</template>

<script>
import tHeader from 'common/mHeader/tHeader'
import ScrollMenu from 'coms/Category/ScrollMenu'
export default {
  name: 'Category',
  data() {
    return {
      activeNames: [],
      cateList: [] // 拿到前台的两个接口,然后合并为一个再使用
    }
  },
  methods: {
    getSon(cid) {
      console.log(cid)
      this.$api.home.getcategory(cid).then(({ status, data: info }) => {
        if (status === 200) {
          console.log(info.result)
          this.cateList = info.result
        }
      })
    }
  },
  components: {
    tHeader,
    ScrollMenu
  },
  created() {
    this.$api.home.getcategorytitle().then(({ status, data: info }) => {
      if (status === 200) {
        console.log(info.result)
        this.cateList = info.result
      }
    })
  }
}
</script>

<style scoped lang='stylus'>
.category

  .main_con
    position absolute
    left 0
    right 0
    top .92rem
    bottom 1rem
</style>
